/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.just.dusin.ooii.component.standard;

import java.util.List;
import java.util.Properties;
import org.dusin.webcoal.exception.OOIIException;
import org.just.dusin.ooii.component.Sink;

/**
 *
 * @author Administrator
 */
public class FanoutPipe implements Sink{
    
    List<Sink> sinkList;

    public List<Sink> getSinkList() {
        return sinkList;
    }

    public void setSinkList(List<Sink> sinkList) {
        this.sinkList = sinkList;
    }

    @Override
    public void process(String msg) throws OOIIException {
       for(Sink sink:sinkList){
           sink.process(msg);
       } 
    }

    @Override
    public void process(List<String> msgs) throws OOIIException {
        for(String msg:msgs){
            process(msg);
        }
    }

    @Override
    public void initComponent(Properties props) {
        
    }

    @Override
    public void destroyComponent() throws Exception {
        
    }
}
